/*
  ID: nemokin1
  PROG: milk3
  LANG: C++
  using: truncate dfs, seems use too much time
*/

#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <fstream>
 
using namespace std;
 
#define REP(i,n) for(int i=0; i<(n); ++i)
#define FOR(i,a,b) for(int i=(a);i<=(b);++i)
#define FORD(i,a,b) for(int i=(a);i>=b;--i)
#define FOREACH(it,c) for(typeof((c).begin()) it=(c).begin();it!=(c).end();++it)
#define ALL(c) (c).begin(),(c).end()
 
#define debug(x) cerr<< #x << " = " << (x) << "\n";
#define debugv(v) cerr << #v << " = "; FOREACH(it,v) cerr << *it <<","; cerr << "\n";
#define SIZE(a)  (int(a.size()))
 
template<typename T> inline void checkMax(T& a, T b) {if (b>a) a=b;}
template<typename T> inline void checkMin(T& a, T b) {if (b<a) a=b;}
 
typedef long long LL;
typedef vector<int> VI;
typedef vector<string> VS;
typedef long double ld;
const int INF = 1000000000;

bool visited[21][21];
int A,B,C;
set<int> ret;

void dfs(int a, int b, int c)
{
    if(visited[b][c]) return;
    visited[b][c] = 1;
    if(a == 0) ret.insert(c);
    dfs(b+a>B?(b+a-B):0,b+a>B?B:a+b,c);
    dfs(a+b>A?A:a+b,a+b>A?(a+b-A):0,c);
    dfs(a,b+c>C?(b+c-C):0,b+c>C?C:b+c);
    dfs(a,b+c>B?B:b+c,b+c>B?(b+c-B):0);
    dfs(a+c>A?A:a+c,b,a+c>A?(a+c-A):0);
    dfs(a+c>C?(a+c-C):0,b,a+c>C?C:a+c);
}

int main() {
    freopen("milk3.in","r",stdin);
    freopen("milk3.out","w",stdout);
    cin >> A >> B >> C;
    memset(visited,0,sizeof(visited));
    dfs(0,0,C);
    vector<int> v(ret.begin(),ret.end());
    for(int i = 0; i < v.size()-1; i++)
	cout<<v[i]<< " ";
    cout<<v[v.size()-1]<<endl;
    exit(0);
}
    
